<template>
  <div>
    <avue-crud
      ref="crud"
      style="width:100%"
      :data="loadData"
      :option="tableOption"
      :table-loading="loading"
    >
    <!-- <template slot-scope="scope" slot="indexLabel">
        <span>{{scope.row.$index+(page.current - 1) * page.size + 1}}</span>
      </template>
      <template slot="paySerials" slot-scope="scope">
        <div v-for="(item,index) in scope.row.paySerials" :key="index">
          <span>{{item.payChannelNo == '01'?'微信':(item.payChannelNo == '02'?'储值卡':'支付宝')}}</span>
          /
          <span>{{item.payAmt}}元</span>
        </div>
      </template> -->
      <template slot="menu" slot-scope="scope">
        <el-button v-if="scope.row.status == '01'" type="text" icon="el-icon-view" @click="gongzuojilu(scope.row.workorderInfoId)">工单记录</el-button>
       <el-button
          @click="dispatch(scope.row)"
          v-if="scope.row.status == '00'"
          type="text"
        >确认领取</el-button>
      </template>
    </avue-crud>
    <template>
      <div style="width:100%;position:relative;height:100px">
        <el-pagination
          :page-sizes="[10, 20,30,40, 50, 100]"
          :pager-count="7"
          :current-page="page.current"
          :page-size="page.size"
          :total="page.total"
          layout="total, sizes, prev, pager, next, jumper"
          style="margin:2% 0;position:absolute;right:1%"
          background
          @size-change="sizeChange"
          @current-change="currentChange"
        ></el-pagination>
        <el-dialog title="工单记录" destroy-on-close :visible.sync="dialogVisible" width="45%">
          <avue-crud
            style="width:100%"
            :data="gdjlloadData"
            :option="gdjltableOption"
            :table-loading="gdjlloading"
          ></avue-crud>
        </el-dialog>
      </div>
    </template>
    <!-- <dispatch ref="dispatchRef" /> -->
  </div>
</template>

<script src='./allOrder.js'></script>

<style lang="scss">
</style>